<template>
	<view class="content">
		<view class="icon-list">
			<view v-for="(item,index) in list" :key="index" class="icon" :style="'background-image:url('+(item != null ? item.imageUrl : '../../static/img/myname.png') +')'" @click="detailCompany(item)">
				<image src="../../static/img/ad_mark.png"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'mheader',
		props: {
			list:Array,
			bgcolor: {
				value: String,
				default: '#ab61ff'
			}
		},
		data() {
			return {
				baseUrl:this.$mConfig.baseUrl
			};
		},
		methods:{				
			detailCompany(e){
				 this.$emit('click', {
				 	model: e
				 })
				this.$mRouter.push({
					route:this.$mRoutesConfig.releaseNumber,
					query:{
						id:e.owner
					}
				});
			},
		}
	}
</script>

<style scoped lang="scss">
	.content {
		width: 100%;
		height: 230upx;
		padding-top: 20upx;
	}

	.icon-list {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-wrap: wrap;
	}

	.icon {
		width: 83rpx;
		height: 90rpx;
		margin: 0 10rpx;
		overflow: hidden;
		background-size:100% auto;
		background-repeat: no-repeat;
		background-position: center center;
	}
	.icon:nth-child(1) {
		margin-left: 179rpx;
	}
	.icon:nth-child(4) {
		margin-right: 179rpx;
	}

	image {
		width: 83upx;
		height: 90rpx;
	}

	.bottom {
		padding: 0 128upx;
		margin-top: -10upx;
	}

	.icon:nth-child(1) {
		background-position: 0 0;
	}
</style>
